NHibernate is an extremely flexible object-relational mapper. For simplicity, the NHibernate Designer doesn’t expose all the options that the NHibernate engine supports. This page summarises the features and options that are supported by the designer.
The designer also provides “escape hatches” so that, if you do need an option which it doesn’t support, you can drop back to hand-writing it while still using the designer for other elements of your model.
Entities
- Create entity classes
- Map entities to tables
- Table per hierarchy inheritance (also known as “single table inheritance”)
- Most standard property types
- User-defined types including enums and custom mappings
- Identity generators: hilo, sequence hilo, sequence, identity column, GUID, GUID Comb and assigned
- Validation using NHibernate.Validator
Associations
- One-to-many, one-to-one and many-to-many associations
- Associations are always to the primary key (property-ref is not supported)
- Bag, set, list and map collections (arrays are not supported)
- Cascade options
- Lazy or eager load
Components
- Create component classes
- Create entity properties of component type
- Collections of components are not supported
- Subcomponents are not supported
Configuration and Project Setup
- Automatically add NHibernate assemblies to your project
- Generate .NET configuration or hibernate.cfg.xml files
Database
- Iterative database creation for development environments
- Migrations framework for production environments
Code Generation
- Single file or file per entity type
- XML or Fluent NHibernate mappings